#!/usr/bin/env python
####### workaround so that the module is found #######
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__),"../../src"))
######################################################

from rosinterface_handler.interface_generator_catkin import *
gen = InterfaceGenerator()

# Parameters with different types
gen.add("int_param_w_minmax", paramtype="int", description="An Integer parameter", default=3, min=0, max=2)
gen.add("double_param_w_minmax", paramtype="double",description="A double parameter", default=3.1, min=0., max=2.)

gen.add("vector_int_param_w_minmax", paramtype="std::vector<int>", description="A vector of int parameter", default=[-1,2,3], min=0, max=2)
gen.add("vector_double_param_w_minmax", paramtype="std::vector<double>", description="A vector of double parameter", default=[-1.1, 1.2, 2.3], min=0., max=2.)

gen.add("map_param_w_minmax", paramtype="std::map<std::string,double>", description="A map parameter", default={"value1": -1.2,"value2": 1.2,"value3": 2.2}, min=0., max=2.)

#Syntax : Package, Node, Config Name(The final name will be MyDummyConfig)
exit(gen.generate("rosinterface_handler", "rosinterface_handler_test", "MinMax"))
